#include "wb32l003.h"
#include <stdio.h>
#include "MACRO.H"
#include "VALUE_SET.H"
#include "IO_SETUP.H"

unsigned char NEG_FIG=0;
unsigned long WEIGHT_OUT;
/*****************************************************************************/
void SHOW_WEIGHT(void)
{
	if(ATZ==1 && Have_W==1 && TARE_WEIGHT==0){
		WT=0;
	}
	
	if(TARE_WEIGHT>WT || (OFFSET_NEG==1 && WT>0)){
		NEG_FIG=1;
	}
	else{
		NEG_FIG=0;
	}  
	
	if(OFFSET_NEG==1 && TARE_WEIGHT!=0){
		WEIGHT_OUT=TARE_WEIGHT+WT;
	}
	else{
		if(WT>TARE_WEIGHT){
			WEIGHT_OUT=WT-TARE_WEIGHT;
		}
		else{
			WEIGHT_OUT=TARE_WEIGHT-WT;
		}
	}
	
	if(over==0){
		L1ShowNum(WEIGHT_OUT, DOT);
	}
	else{
		L1ShowTxt('_','-','o','l','-','_');
	}
}
